<?php
/**
 * @package	Joomla.Administrator
 * @subpackage	mod_quickicon
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license	GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;



abstract class modHdQuickIconHelper
{

protected static $buttons = array();

public static function &getButtons($params)
	{$key = (string)$params;
	if (!isset(self::$buttons[$key])) {
	$context = $params->get('context', 'mod_quickicon');
	if ($context == 'mod_quickicon')
	{



self::$buttons[$key] = array( );
			}
else { self::$buttons[$key] = array(); }

echo '<div class="cpanel">

<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-one", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-one", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-one", "").'</span></a></div></div>';
 
if ($params->get("hd-qi-act-two", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-two", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-two", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-two", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-three", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-three", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-three", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-three", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-four", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-four", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-four", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-four", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-five", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-five", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-five", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-five", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-six", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-six", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-six", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-six", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-seven", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-seven", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-seven", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-seven", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-eight", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-eight", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-eight", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-eight", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-nine", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-nine", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-nine", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-nine", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-ten", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-ten", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-ten", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-ten", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-eleven", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-eleven", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-eleven", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-eleven", "").'</span></a></div></div>';};

if ($params->get("hd-qi-act-twelve", "") ==1) {echo '<div class="icon-wrapper"><div class="icon"><a href="'. $params->get("hd-qi-url-twelve", "") .'">
<img src="../administrator/templates/bluestork/images/header/'.$params->get("hd-qi-img-twelve", "").'" alt=""  />
<span>'.$params->get("hd-qi-title-twelve", "").'</span></a></div></div>';};

echo '</div> ';

// Include buttons defined by published quickicon plugins
JPluginHelper::importPlugin('quickicon');
$app = JFactory::getApplication();
$arrays = (array) $app->triggerEvent('onGetIcons', array($context));
foreach ($arrays as $response) {
foreach ($response as $icon) {
$default = array( 'link' => null, 'image' => 'header/icon-48-config.png', 'text' => null, 'access' => true );
$icon = array_merge($default, $icon);
if (!is_null($icon['link']) && !is_null($icon['text'])) { self::$buttons[$key][] = $icon;
}}}}
return self::$buttons[$key];}

public static function getTitle($params, $module)
	{$key = $params->get('context', 'mod_hd-quickicon') . '_title';
	if (JFactory::getLanguage()->hasKey($key)) {return JText::_($key);} else {return $module->title;}}}
		